home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 63140 / 63140.xpi / chrome / content / pref.xul < prev    next >
Extensible Markup Language  |  2009-01-23  |  2KB  |  47 lines

  1. <?xml version="1.0"?>
  2. <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
  3. <!DOCTYPE prefwindow SYSTEM "chrome://tabundle/locale/tabundle.dtd">
  4. <prefwindow id="tabundle-window"
  5.      title="tabundle settings"
  6.      xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  7.      buttons=",">
  8. <prefpane id="tabundle-prefpane" label="tabundle settings">
  9. <script>
  10. function selectHtmlDir() {
  11.     var nfp = Components.interfaces.nsIFilePicker
  12.     var fp = Components.classes['@mozilla.org/filepicker;1'].createInstance(nfp)
  13.     fp.init(window, 'select html dir', nfp.modeGetFolder)
  14.  
  15.     if (fp.show() == nfp.returnOK) {
  16.         var hd = getField('htmlDir')
  17.         hd.value = fp.file.path
  18.         var pp = document.getElementsByTagName('prefpane')[0]
  19.         pp.userChangedValue(hd)
  20.     }
  21. }
  22. function getField(name){
  23.     return document.getElementsByAttribute('preference', name)[0];
  24. }
  25. </script>
  26. <preferences>
  27.   <preference id="htmlDir" name="extensions.tabundle.htmlDir" type="string" />
  28.   <preference id="excludeUrls" name="extensions.tabundle.excludeUrls" type="string" />
  29. </preferences>
  30. <hbox align="center">
  31.   <label value="html dir:" />
  32.   <textbox preference="htmlDir" flex="1" readonly="readonly" />
  33.   <button label="&label.browse;" onclick="selectHtmlDir()" />
  34. </hbox>
  35. <!--
  36. <hbox align="center">
  37.   <label value="exclude urls:" />
  38.   <textbox preference="excludeUrls" flex="1" />
  39. </hbox>
  40. -->
  41. <hbox>
  42.   <spacer flex="1" />
  43.   <button label="&label.close;" onclick="window.close()" />
  44. </hbox>
  45. </prefpane>
  46. </prefwindow>
  47.